
set :application, "jon-and-jon-productions"             # Can be whatever you want, I use the project name from my SVN repository
set :domain, "www.jonandjon.co.uk"                           # The URL for your app
set :user, "jonandjo"                                 # Your HostingRails username

# For a Subversion repository
set :repository, "https://jon-and-jon-productions.googlecode.com/svn/trunk"                      # The repository location for http access from the server
set :scm_username, "jonartus@gmail.com" 
set :scm_password, "FV4qD6NZ7Dy5"
set :use_sudo, false                                  # HostingRails users don't have sudo access

set :deploy_to, "/home/#{user}/apps/#{application}"   # Where on the server your app will be deployed
set :deploy_via, :checkout                            # For this tutorial, svn checkout will be the deployment method, but check out :remote_cache in the future
set :group_writable, false                            # By default, Capistrano makes the release group-writable. You don't want this with HostingRails
# set :mongrel_port, "4444"                           # Mongrel port that was assigned to you
# set :mongrel_nodes, "4"                             # Number of Mongrel instances for those with multiple Mongrels

default_run_options[:pty] = true
# Cap won't work on windows without the above line, see
# http://groups.google.com/group/capistrano/browse_thread/thread/13b029f75b61c09d
# Its OK to leave it true for Linux/Mac

# ssh_options[:keys] = %w(/Path/To/id_rsa)              # If you are using ssh_keys

role :app, domain
role :web, domain
role :db,  domain, :primary => true

task :restart, :roles => :app do
end

task :after_update_code, :roles => [:web, :db, :app] do
  run "chmod 755 #{release_path}/public -R" 
end

